// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults

$( function() {

  //$('.tabs').tabs();
  
	$("#close_flash_msg").live('click', function() {
		$("#msg").remove();
		return false;	
	});
	
});

function js_flash_notice(notice) {
	var notice_html = js_build_flash_message('ok', notice);
	$("#page").append(notice_html);
}
function js_flash_error(error) {
	var error_html = js_build_flash_message('err', error);
	$("#page").append(error_html);
}
function js_build_flash_message(type, content) {
  $('#msg').remove();
	var tag = '<div id="msg" class="'+  type + '"><div><a class="btt fr" href="#" id="close_flash_msg">关闭</a>'+ content +'</div></div>';
	return tag;
}
